<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/admin_common.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/admin_main.css"/>
    <script type="text/javascript" src="__JS__/modernizr.min.js"></script>
    <script type="text/javascript" src="__JS__/jquery-1.8.0.min.js"></script>
</head>
<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <!-- <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1> -->
            <img style="height:50px;display:block;overflow:hidden;" src="__IMG__/logo_mall.jpg" alt="">
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <!-- <li><a href="#">管理员</a></li> -->
                <!-- <li><a href="#">修改密码</a></li> -->
                <li><a href="<?php echo U('Admin/Public/loginout');?>">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <!--<li>
                    <a href="<?php echo U('Admin/Index/index');?>"><i class="icon-font">&#xe003;</i>常用操作</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('Admin/Adminuser/index');?>">用户管理</a></li>
                        <li><a href="<?php echo U('Admin/Express/index');?>">物流商户管理</a></li>
                        <li><a href="<?php echo U('Admin/Goods/index');?>">商品列表</a></li>

                    </ul>
                </li>
                <li>
                    <a href="<?php echo U('Admin/Prize/index');?>"><i class="icon-font">&#xe003;</i>配送管理</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('Admin/Prize/unsend');?>">未配送管理</a></li>
                        <li><a href="<?php echo U('Admin/Prize/hassend');?>">已配送管理</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>结算管理</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('Admin/Prize/LTbalance');?>">联通已结算订单</a></li>
                        <li><a href="<?php echo U('Admin/Prize/WLbalance');?>">物流已结算订单</a></li>
                    </ul>
                </li>-->
                <?php foreach($menu['main'] as $k1=>$v1){ echo '<li>'; echo '<a href="'.$v1[url].'"><i class="icon-font">&#xe003;</i>'.$v1[title].'</a>'; if($menu['sub'][$k1]){ echo '<ul class="sub-menu">'; foreach($menu['sub'][$k1] as $k2=>$v2){ echo '<li><a href="'.$v2[url].'">'.$v2[title].'</a></li>'; } echo '</ul>'; } echo '</li>'; } ?>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">商品管理</span></div>
    </div>
    <div class="search-wrap">
        <div class="search-content">
            <form action="" method="post">
                <table class="search-tab">
                    <tr>
                        <th width="120">分类:</th>
                        <td><?php echo frm_out_put($sortarr,'sort','option',$query['sort'],'','-请选择-');?></td>
                        <th width="120">搜索类型:</th>
                        <td>
                            <select name="type" id="">
                                <option value="-1" <?php if($query['type'] == -1): ?>selected="selected"<?php endif; ?> >全部</option>
                                <option value="1" <?php if($query['type'] == 1): ?>selected="selected"<?php endif; ?> >商品码</option>
                                <option value="2" <?php if($query['type'] == 2): ?>selected="selected"<?php endif; ?> >标题</option>
                            </select>
                        </td>
                        <th width="70">关键字:</th>
                        <td><input class="common-text" placeholder="关键字" name="keywords" value="<?php echo ($query['keywords']); ?>" id="" type="text"></td>
                        <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <div class="result-wrap">
        <form name="myform" id="myform" method="post">
            <div class="result-title">
                <div class="result-list">
                    <a href="<?php echo U('Admin/Goods/set');?>"><i class="icon-font"></i>新增商品</a>
                    <!-- <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a> -->
                    <a href="<?php echo U('Admin/Goods/export');?>" target="_blank"><i class="icon-font">&#xe005;</i>导出</a>
                   <!--  <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a> -->
                </div>
            </div>
            <div class="result-content">
                <table class="result-tab" width="100%">
                    <tr>
                        <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>
                        <th>ID</th>
                        <th>商品码</th>
                        <th>标题</th>
                        <th>市场价</th>
                        <th>联通商城价</th>
                        <th>分类</th>
                        <th>状态</th>
                        <th width="10%">发布时间</th>
                        <th>操作</th>
                    </tr>
                    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                        <td class="tc"><input name="id[]" value="59" type="checkbox" value="<?php echo ($vo["id"]); ?>"></td>
                        <td><?php echo ($vo["id"]); ?></td>
                        <td><?php echo ($vo["sncode"]); ?></td>
                        <td><a target="_blank" href="<?php echo U('Home/Index/detail',array('code'=>$vo[sncode]));?>" title="<?php echo ($vo["title"]); ?>"><?php echo ($vo["title"]); ?></a>
                        </td>
                       	<td>￥<?php echo ($vo["price"]); ?></td>
                       	<td>￥<?php echo ($vo["saleprice"]); ?></td>
                       	<td><?php echo ($sortarr[$vo['sort']]); ?></td>
                       	<td>
                        <?php if($vo['status']){ echo "<span class='blue'>未领取</span>"; }else{ echo "<span class='red'>已领取</span>"; } ?>
                        </td>
                       	
                       	<td><?php echo date('Y-m-d H:i:s',$vo['create_time']);?></td>
                        <td>
                            <a class="link-update mr10" href="<?php echo U('Home/Index/detail',array('code'=>$vo[sncode]));?>" target="_blank">预览</a>
                            <!--<a class="link-update mr10" href="<?php echo U('Goods/edit',array('id'=>$vo[id]));?>">修改</a>-->
                            <a class="link-del mr10" href="<?php echo U('Goods/del',array('id'=>$vo[id]));?>">删除</a>
                            <a class="link-clone" style="cursor: pointer;" href="<?php echo U('Goods/clone1',array('id'=>$vo[id],'num'=>'var'));?>">克隆</a>
                        </td>
                    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </table>
                <div class="list-page"> <?php echo ($page); ?></div>
            </div>
        </form>
        <!--克隆提交的表单-->
        <!--<form id="clone_form" action="<?php echo U('Goods/clone1');?>" method="get">
            <input type="hidden" name="id" value=""/>
            <input type="hidden" name="num" value=""/>
        </form>-->
    </div>
</div>
    <!--/main-->
</div>
</body>
</html>
<script type="text/javascript" src="__JS__/main.js"></script>